luci-mod-network: disable 'Edit' button for dynamic interfaces
authorPaul Donald <[email protected]>
Sun, 31 Dec 2023 13:11:41 +0000 (13:11 +0000)
committerPaul Donald <[email protected]>
Sun, 31 Dec 2023 13:11:41 +0000 (13:11 +0000)
Otherwise they produce "Cannot read properties of null".

Tested on 23.05.2

Fixes issue #6799

Signed-off-by: Paul Donald <[email protected]>
modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js

index 8166ac44b15391f7707eed0e4c3f520b34fa972b..a3f2e9e34acbdeffc6d688a575de6dd2bdf44d8c 100644 (file)
@@ -537,6 +537,11 @@ return view.extend({
                                tdEl.lastChild.childNodes[3].disabled = true;
                        }
 
+                       if (dynamic) {
+                               //disable the 'Edit' button on dynamic interfaces
+                               tdEl.lastChild.childNodes[2].disabled = true;
+                       }
+
                        return tdEl;
                };